package org.gl.training.model;

import java.util.HashMap;

import org.apache.commons.codec.digest.DigestUtils;

public class UserRegistry {

	private static HashMap<String, String> usersMap = new HashMap<String, String>();

	static {
		usersMap.put("Lena", DigestUtils.md5Hex("123"));
		usersMap.put("Dima", DigestUtils.md5Hex("456"));
	}

	public static String getUserPassword(String username) {
		String password = usersMap.get(username);
		return password;
	}

	public static void addUser(String username, String password) {
		usersMap.put(username, password);
	}
}
